﻿using System.Xml;
using Sliver.Utility;
using UnityEngine;

namespace Sliver.Roadnet.OpenDrive
{
    public class RawRoadNode
    {
        public readonly XmlNode Root;

        public readonly string Name;
        public readonly string ID;
        public readonly float Length;

        public RawRoadNode(XmlNode root)
        {
            Root = root;

            Name = root.Attributes.TryGetString("name");
            ID = root.Attributes.TryGetString("id");
            Length = root.Attributes.TryGetFloat("length");
        }

        protected static GameObject TestRoadNodeGameObject;

        static RawRoadNode()
        {
            TestRoadNodeGameObject = Resources.Load<GameObject>("Roadnet/OpenDrive/Road");
        }

        public void GenerateEntity()
        {

        }
    }
}
